<template>
	<view class="groundItem" @tap="goDetails">
		<view class="groundImage">
			<image :src="itemData.images[0]" mode=""></image>
		</view>
		<view class="groundContent">
			<view class="groundName">
				{{itemData.name}}
			</view>
			<view class="groundDesc more-text2">
				{{itemData.desc}}
			</view>
			<view class="groundPrice">
				<text class="fn-sz-22">￥</text> <text class="fn-sz-30">{{itemData.price}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "groundItem",
		props: {
			itemData: {
				type: Object,
				default: () => ({})
			}
		},
		data() {
			return {};
		},
		methods: {
			goDetails() {
				uni.navigateTo({
					url: `/pages/groundPage/details?id=${this.itemData.id}`
				})
			}
		}
	}
</script>

<style lang="scss">
	.groundItem {
		background: #FFFFFF;
		border-radius: 20rpx;
		overflow: hidden;
		margin-bottom: 20rpx;

		.groundImage {
			height: 307rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.groundContent {
			padding: 24rpx 28rpx;

			.groundName {
				font-weight: 500;
				font-size: 30rpx;
				color: #333333;
				margin-bottom: 15rpx;
			}

			.groundDesc {
				font-weight: 400;
				font-size: 24rpx;
				color: #666666;
				margin-bottom: 20rpx;
			}

			.groundPrice {
				font-weight: 400;
				color: #F34035;
			}
		}
	}
</style>